package action;

import impl.locationimpl;

import java.util.List;

import model.TLocation;
import DAO.location;

import com.opensymphony.xwork2.ActionSupport;

public class position extends BaseAction {
	private String bookid;
	

	public String getBookid() {
		return bookid;
	}


	public void setBookid(String bookid) {
		this.bookid = bookid;
	} 

	/**
	 * @return
	 */
	public String execute() {
		location l=new locationimpl();
		
			List<TLocation> list= l.seleLocation(0);
			session.setAttribute("fileList", list);
		
		if (bookid!=null) {
			List<TLocation> list1= l.seleLocation(Integer.parseInt(bookid));
			session.setAttribute("fileList1", list1);
		}
		return SUCCESS;
	}
}